package com.tool.weixin.model;

import java.util.HashMap;
import java.util.Map;

public class TemplateMsg {

	private String touser;
    private String template_id;
    private String url;
    private String topcolor;

    private Map<String, TemplateParam> data;
    
    public TemplateMsg(String openid,String templateid) {
    	this.touser = openid;
    	this.template_id = templateid;
    }

	public String getTouser() {
		return touser;
	}

	public void setTouser(String touser) {
		this.touser = touser;
	}

	public String getTemplate_id() {
		return template_id;
	}

	public void setTemplate_id(String template_id) {
		this.template_id = template_id;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getTopcolor() {
		return topcolor;
	}

	public void setTopcolor(String topcolor) {
		this.topcolor = topcolor;
	}

	public Map<String, TemplateParam> getData() {
		return data;
	}

	public void setData(Map<String, TemplateParam> data) {
		this.data = data;
	}
	
	public void pushData(String key,TemplateParam param) {
		Map<String, TemplateParam> dataMap = this.getData();
		if(dataMap == null) {
			dataMap = new HashMap<String, TemplateParam>();
		}
		dataMap.put(key, param);
		this.setData(dataMap);
	}
	
}
